﻿<%@ Page Language="C#" MasterPageFile="~/web.master" AutoEventWireup="true" CodeBehind="cdc_list.aspx.cs" Inherits="Shuba.Web.master.cdc_list"%>
<%@ Register Assembly="Shuba.Framework" Namespace="Shuba.Framework" TagPrefix="cc" %>
<asp:Content ID="Header1" ContentPlaceHolderID="HeaderPlaceHolder" runat="server">

    <script type="text/javascript">
        function PrintThis() {
            var txt = document.getElementById('<%= txtSearch.ClientID %>').value;
            window.open("cdc_list_excel.aspx?txtSearch=" + txt);
        }
    </script>
    
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
            <td class="text bg_content" bgcolor="#FFFFFF" align="center">
                <p>
                    &nbsp;</p>
                <table class="black" border="0" width="95%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="title_back" align="left">
					    <table class="text" border="0" width="100%" cellspacing="0" cellpadding="0">
					    <tr>
					    <td class="title_back2" width="2%">&nbsp;</td>
					    <td class="title_back2 title_white" width="38%"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
					    <td><span class="title_right"></span></td>
					    </tr>
					    </table>
                        </td>
                        <td class="title_back" align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="border_left bg_subtitle_white">&nbsp;</td>
                        <td class="border_right bg_subtitle" align="right">
                            Customer Name / PRN&nbsp;<asp:TextBox ID="txtSearch" CssClass="text" runat="server" Width="250px"></asp:TextBox>&nbsp;
                            <asp:Button ID="btnSearch" CssClass="buttonsmall" runat="server" Text="Search" OnClick="btnSearch_Click" />&nbsp;&nbsp;
                            <input type="button" value="Export to Excel" onclick="PrintThis();" class="button" />&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="border" colspan="2">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <cc:SHUBAGrid ID="gvList" runat="server" AutoGenerateColumns="False" Width="100%"
                                DataKeyNames="PROSPECT_ID" AllowPaging="True" PageSize="20" 
                                OnPageIndexChanging="gvList_PageIndexChanging" 
                                AllowSorting="True" OnSorting="gvList_Sorting">
                                <Columns>
                                    <asp:BoundField DataField="PROSPECT_NO" HeaderText="PROSPECT REFERENCE NO." SortExpression="PROSPECT_NO" ItemStyle-HorizontalAlign=Center/>
                                    <asp:BoundField DataField="KTP_NO" HeaderText="KTP NUM" SortExpression="KTP_NO" ItemStyle-HorizontalAlign=Left />
                                    <asp:BoundField DataField="KTP_NAME" HeaderText="KTP NAME" SortExpression="KTP_NAME" ItemStyle-HorizontalAlign=Left />
                                    <asp:BoundField DataField="DATE_OF_BIRTH" HeaderText="DATE OF BIRTH" SortExpression="DATE_OF_BIRTH" DataFormatString="{0:dd MMM yyyy}" ItemStyle-HorizontalAlign=Center />
                                    <asp:TemplateField HeaderStyle-Width="12%" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" HeaderText="STATUS">
                                        <ItemTemplate>
                                            <asp:DropDownList SelectedValue='<%# Bind("IS_BI_CHECKING") %>' CssClass="text" ID="ddlStatus" runat="server">
                                            <asp:ListItem Text="In Progress" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="In Progress" Value=" "></asp:ListItem>
                                            <asp:ListItem Text="Done" Value="1"></asp:ListItem>
                                            </asp:DropDownList>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <PagerSettings Mode="Numeric" Visible="true" />
                                <EmptyDataTemplate>
                                    <table class="text" width=100% cellpadding=0 cellspacing=0><tr><td class="bg_grid2" align=center>NO RECORD FOUND</td></tr></table>
                                </EmptyDataTemplate>
                            </cc:SHUBAGrid>
                    </ContentTemplate>
                    <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="gvList" EventName="PageIndexChanging"/>
                    <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
                    <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click"/>
                    </Triggers>
                    </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align=right><br />
                            <asp:Button ID="btnSubmit" CssClass="button" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
                        </td>
                    </tr>
                </table>
                
                <br />
			    <!-- Error Message -->
			    <table runat=server visible=false id="ErrBox" border="0" width="100%" cellspacing="0" cellpadding="2">
			    <tr>
			    <td class="bg_grid2" align=center><asp:Label ID="ErrMsg" runat="server" Text="" Font-Bold=true ForeColor="Red"></asp:Label></td>
			    </tr>
			    </table>
			    <!-- End Of Error Message -->
			    
			    <p>&nbsp;</p>
			    
            </td>
        </tr>
    </table>
</asp:Content>